package review.data_structure;

/**
 * @author haomin
 * @date 2022/10/26 20:53
 **/
public class Test {
    public static void main(String[] args) {
        // 1. 数组测试
        MyArray myArray = new MyArray(5);
        myArray.addLast(3);
        myArray.addFirst(1);
        myArray.addIndex(1, 2);
        myArray.addLast(4);
        myArray.addLast(5);
        myArray.addLast(6);
        System.out.println("增：" + myArray);
        System.out.println("查：" + myArray.searchIndex(0));
        myArray.update(0, 10);
        System.out.println("改：" + myArray);
        myArray.deleteFirst();
        myArray.deleteLast();
        myArray.deleteIndex(0);
        System.out.println("删：" + myArray);

    }
}